import { useEffect } from 'react';
// useMount:只在初始化的时候执行hook
const useMount = (fn: () => void) => {
  useEffect(() => {
    fn?.();
  }, []);
};

export default useMount;
